/*
 * @Description:
 * @Author: william
 * @Date: 2025-02-25 18:31:07
 * @LastEditors: william
 * @LastEditTime: 2025-08-08 15:51:16
 */

const prefix = '/tenant'
const prefix2 = '/user'
const prefix3 = '/role'
const prefix4 = '/department'
const prefix5 = '/app'

// =====================  租户管理 =====================
// -------------------  查询租户列表 -------------------
export const apiTenantList = data => g_https.post(`${prefix}/list`, data)

// -------------------  新增租户 -------------------
export const apiTenantCreate = data => g_https.post(`${prefix}/create`, data)

// -------------------  查询租户详情 -------------------
export const apiTenantDetail = data => g_https.get(`${prefix}/detail`, data)

// -------------------  编辑租户 -------------------
export const apiTenantEdit = data => g_https.post(`${prefix}/edit`, data)

// -------------------  删除租户 -------------------
export const apiTenantDelete = data => g_https.post(`${prefix}/delete`, data)

// -------------------  编辑租户状态 -------------------
export const apiTenantStatusChange = data =>
  g_https.post(`${prefix}/status/change`, data)

// -------------------  查询租户下拉列表 -------------------
export const apiTenantDropList = data =>
  g_https.post(`${prefix}/dropList`, data)

// -------------------  查询聊天对话租户列表 -------------------
export const apiChatTenantList = data =>
  g_https.post(`${prefix}/chatTenantList`, data)

// =====================  用户管理  =====================

// -------------------  新增用户 -------------------
export const apiUserCreate = data => g_https.post(`${prefix2}/create`, data)

// -------------------  查询用户列表 -------------------
export const apiUserList = data => g_https.post(`${prefix2}/list`, data)

// -------------------  查询用户详情 -------------------
export const apiUserDetail = data => g_https.post(`${prefix2}/detail`, data)

// -------------------  修改用户 -------------------
export const apiUserUpdate = data => g_https.post(`${prefix2}/update`, data)

// -------------------  删除用户 -------------------
export const apiUserDelete = data => g_https.post(`${prefix2}/delete`, data)

// =====================  角色管理  =====================

// -------------------  新增角色 -------------------
export const apiRoleCreate = data => g_https.post(`${prefix3}/create`, data)

// -------------------  查询角色列表 -------------------
export const apiRoleList = data => g_https.post(`${prefix3}/list`, data)

// -------------------  查询角色详情 -------------------
export const apiRoleDetail = data => g_https.post(`${prefix3}/detail`, data)

// -------------------  修改角色 -------------------
export const apiRoleUpdate = data => g_https.post(`${prefix3}/update`, data)

// -------------------  删除角色 -------------------
export const apiRoleDelete = data => g_https.post(`${prefix3}/delete`, data)

// -------------------  查询角色下拉列表 -------------------
export const apiRoleDropList = data => g_https.get(`${prefix3}/dropList`, data)

// =====================  部门管理  =====================

// -------------------  查询部门树节点列表 -------------------
export const apiDeptTreeList = data => g_https.post(`${prefix4}/treeList`, data)

// -------------------  查询部门列表 -------------------
export const apiDeptList = data => g_https.post(`${prefix4}/list`, data)

// -------------------  新增部门 -------------------
export const apiDeptCreate = data => g_https.post(`${prefix4}/create`, data)

// -------------------  编辑部门 -------------------
export const apiDeptUpdate = data => g_https.post(`${prefix4}/update`, data)

// -------------------  删除部门 -------------------
export const apiDeptDelete = data => g_https.post(`${prefix4}/delete`, data)

// =====================  应用管理  =====================

// -------------------  查询应用分页列表 -------------------
export const apiAppPageList = data => g_https.post(`${prefix5}/pageList`, data)

// -------------------  创建租户应用关联信息 -------------------
export const apiCreateTenantApp = data =>
  g_https.post(`${prefix5}/createTenantApp`, data)

// -------------------  查询应用列表 -------------------
export const apiAppList = data => g_https.get(`${prefix5}/list`, data)

// -------------------  查询用户已开通的应用 -------------------
export const apiGetTenantApp = data =>
  g_https.get(`${prefix5}/getTenantApp`, data)
